package net.csdn.business.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @ClassName DefaultLangEnum
 * @Description 默认语言
 * @Author zhangyl
 * @Date 2023/7/27 09:19
 */
@Getter
@AllArgsConstructor
public enum DefaultLangEnum {

    ZH_CN("zh_CN", "中文"),
    EN_US("en_US", "英文"),
    ;
    final String code;
    final String desc;

    public static boolean isExist(String code) {
        for (DefaultLangEnum langEnum : DefaultLangEnum.values()) {
            if (langEnum.code.equals(code)) {
                return true;
            }
        }
        return false;
    }
}
